<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>毕业季——留下你的青春回忆</title>

    <!-- Bootstrap -->
    <link href="/cy/Public/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/cy/Public/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="/cy/Public/lib/bootstrap_validator/css/bootstrapValidator.min.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  	  <script src="/cy/Public/js/html5shiv.min.js" type="text/javascript" charset="utf-8"></script>
  	  <script src="/cy/Public/js/respond.min.js" type="text/javascript" charset="utf-8"></script>
    <![endif]-->
    
  </head>
  <body>
  	     <div class="content-bg"></div>
        <div class="bg-overlay"></div>

<div class="container">
        <div id="top-alert" class="fixed alert alert-error danger" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
	<form class="form-horizontal" action="<?php echo U("Home/index/up");?>" enctype="multipart/form-data" method="post" role="form">
		    <fieldset>
        <legend class="text-center">
				<p>
					“书脸——阅读与我”摄影展
				</p>
				<h3>
					东北农业大学图书馆
				</h3>
        </legend>

				<p class="text-warning ms">在青春的岁月里，在阅读的进行时，捧起一本好书，留下一张相片，创造一抹回忆，行动起来吧，爱阅读的盆友们！</p>


				   <div class="form-group">
				   		<label for="xykh" class="col-xs-4 col-md-2 col-md-offset-2 col control-label ss">校园卡号：</label>
				      <div class="col-xs-6">
				         <input type="text" class="form-control" name="xykh" id="xykh" placeholder="请输入校园卡号">
				      </div>
				   </div>					
				   <div class="form-group">
				      <label for="name" class="col-xs-4 col-md-2 col-md-offset-2 control-label ss">姓名：</label>
				      <div class="col-xs-6">
				         <input type="text" name="name" class="form-control" id="name" placeholder="请输入姓名">
				      </div>
				   </div>
				   <div class="form-group">
				      <label for="mobile" class="col-xs-4 col-md-2 col-md-offset-2 control-label ss">手机：</label>
				      <div class="col-xs-6">
				         <input type="text" name="mobile" class="form-control" id="mobile" placeholder="请输入手机">
				      </div>
				   </div>				   
				   
				   <div class="form-group">
				      <label for="xueyuan" class="col-xs-4 col-md-2 col-md-offset-2 control-label ss">学院：</label>
				      <div class="col-xs-6">
				         <input type="text" class="form-control" name="xueyuan" id="xueyaun" 
				            placeholder="请输入学院">
				      </div>
				   </div>
				   <div class="form-group">
				      <label for="xueyuan" class="col-xs-4 col-md-2 col-md-offset-2 control-label ss">作品名称：</label>
				      <div class="col-xs-6">
				         <textarea class="form-control" style="height:80px" name="jiyu" in="jiyu" onkeydown="checkMaxInput(this,200)" onkeyup="checkMaxInput(this,200)" onfocus="checkMaxInput(this,200)" onblur="checkMaxInput(this,200);resetMaxmsg()"
				          placeholder="作品名称"></textarea>
				      </div>
				   </div>				   
				   <div class="form-group">
				      <label for="lastname" class="col-xs-4 col-md-2 col-md-offset-2 control-label">照片：</label>
				      <div class="col-xs-6">
				         
				      </div>
				   </div>			
				   <div class="form-group">
				      <label for="verify" class="col-xs-4 col-md-2 col-md-offset-2 control-label ss">验证码：</label>
				      <div class="col-xs-6">
				         <input type="text" class="form-control" name="verify" id="verify" 
				            placeholder="请输入验证码">
				            <img class="verifyimg reload-verify" alt="验证码" src="<?php echo U('Home/index/verify');?>" title="点击刷新">
				      </div>
				   </div>				   
				   
				   
				   	   
				   <div class="form-group">
				      <div class="col-xs-12 text-center">
				      <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
				         <button type="submit" class="btn btn-default ajax-post">提交</button>
				            <a href="<?php echo U('Home/index/liulan');?>" class="btn btn-default" role="button">浏览 </a>
				      </div>
				   </div>	



  
  </div>
  
  
  
    </fieldset>




	</form>

		</div>


    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="/cy/Public/js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/cy/Public/js/bootstrap.js"></script>
    <script src="/cy/Public/js/common.js"></script>
    <script src="/cy/Public/lib/bootstrap_validator/js/bootstrapValidator.min.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
        $(function(){
            // 刷新验证码
            $(".reload-verify").on('click', function() {
                var verifyimg = $(".verifyimg").attr("src");
                if (verifyimg.indexOf('?') > 0) {
                    $(".verifyimg").attr("src", verifyimg + '&random=' + Math.random());
                } else {
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
                }
            });
            
            
          	$('.tj-modal').bootstrapValidator({
            feedbackIcons: {
                valid: 'fa fa-check',
                invalid: 'fa fa-remove',
                validating: 'fa fa-refresh'
            },
            fields: {
                name: {
                    validators: {
                        notEmpty: {
                            message: '请输入用户名'
                        }
                    }
                },
                verify: {
                    validators: {
                        notEmpty: {
                            message: '请输入验证码'
                        }
                    }
                },
                xykh: {
                    validators: {
                        notEmpty: {
                            message: '请输入校园卡号'
                        }
                    }
                },
                jiyu: {
                    validators: {
                        notEmpty: {
                            message: '请输入作品名称'
                        }
                    }
                },                
                mobile: {
                    validators: {
                        notEmpty: {
                            message: '请输入手机号'
                        },
                        regexp: {
                            regexp: /^1[3|4|5|7|8]\d{9}$/,
                            message: '手机号格式不正确'
                        }
                    }
                }              
            }
        }); 
            
            
        }); 
        
        //多行文本输入框剩余字数计算  
                function checkMaxInput(obj, maxLen) {  
                    if (obj == null || obj == undefined || obj == "") {  
                        return;  
                    }  
                    if (maxLen == null || maxLen == undefined || maxLen == "") {  
                        maxLen = 100;  
                    }  
          
                    var strResult;  
                    var $obj = $(obj);  
                    var newid = $obj.attr("id") + 'msg';  
          
                    if (obj.value.length > maxLen) { //如果输入的字数超过了限制  
                        obj.value = obj.value.substring(0, maxLen); //就去掉多余的字  
                        strResult = '<span id="' + newid + '" class=\'Max_msg\' ><br/>还能输入(' + (maxLen - obj.value.length) + ')字</span>'; //计算并显示剩余字数  
                    }  
                    else {  
                        strResult = '<span id="' + newid + '" class=\'Max_msg\' ><br/>还能输入(' + (maxLen - obj.value.length) + ')字</span>'; //计算并显示剩余字数  
                    }  
          
                    var $msg = $("#" + newid);  
                    if ($msg.length == 0) {  
                        $obj.after(strResult);  
                    }  
                    else {  
                        $msg.html(strResult);  
                    }  
                }  
          
                //清空剩除字数提醒信息  
                function resetMaxmsg() {  
                    $("span.Max_msg").remove();  
                }  

        </script>
  </body>
</html>